package entity

import (
	"time"

	"shqsoft.cn/pasnj/base"
)

//  INDI_LOAN V_对私_个人贷款
type INDILOAN struct {
	NO     int       `gorm:"column:ID"` //
	EVNO   string    `gorm:"column:借据号"`
	CONO   string    `gorm:"column:合同编号"`
	ACNO   string    `gorm:"column:帐号"`
	UTNM   string    `gorm:"column:开户网点"`
	UTID   int       `gorm:"column:机构ID"`
	CYNM   string    `gorm:"column:币种"`
	ITEM   string    `gorm:"column:科目"`
	CUNM   string    `gorm:"column:客户名称"`
	GVVL   float64   `gorm:"column:发放金额"`
	VLDT   time.Time `gorm:"column:起息日";type:date;`
	MADT   time.Time `gorm:"column:到期日";type:date;`
	LAKD   string    `gorm:"column:贷款种类"`
	KDNM   string    `gorm:"column:贷款名称"`
	TPNM   string    `gorm:"column:贷款类型"`
	TLTM   int       `gorm:"column:当期数"`
	TTTM   int       `gorm:"column:总期数"`
	INRT   float64   `gorm:"column:利率"`
	STCD   int       `gorm:"column:帐户状态"`
	CLDT   time.Time `gorm:"column:销户日";type:date;`
	PRBL   float64   `gorm:"column:上日余额"`
	ACBL   float64   `gorm:"column:当前余额"`
	AMAL   float64   `gorm:"column:开户日均"`
	MOAL   float64   `gorm:"column:月日均"`
	SEAL   float64   `gorm:"column:季日均"`
	YEAL   float64   `gorm:"column:年日均"`
	ACID   int       `gorm:"column:帐户ID"`
	FORT   int       `gorm:"column:浮动利率"`
	DKBB   float64   `gorm:"column:贷款拔备率"`
	BSRT   float64   `gorm:"column:基准利率"`
	ISKF   string    `gorm:"column:是否开发贷款"`
	CUID   int       `gorm:"column:CUID"`
	ISDDB  string    `gorm:"column:短贷宝"`
	IDNO   string    `gorm:"column:IDNO"`
	TPNO   int       `gorm:"column:TPNO"`
	CYNO   string    `gorm:"column:CYNO"`
	KDNO   string    `gorm:"column:KDNO"`
	JYDW   string    `gorm:"column:经营单位"`
	ISDIVI bool      `gorm:"column:ISDIVI"`
}

//TableName INDI_LOAN个人贷款
func (INDILOAN) TableName() string {
	return "V_对私_个人贷款"

}

//对私_个贷明细
func INDILOANEF() base.EntityFunc {
	return func() interface{} {
		entity := INDILOAN{}
		return &entity
	}
}

//对私_个贷明细
func INDILOANESF() base.EntitiesFunc {
	return func() interface{} {
		var entities []INDILOAN
		return &entities
	}
}
func init() {
	dao := base.NewDefaultDao(INDILOANEF(), INDILOANESF(), nil)
	filter := base.DefaultFilter{
		FilterColName: "机构ID",
	}
	dao.Fileter = &filter
	base.DaoPoolObj.Put("INDILOAN", dao)
}
